import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
import IndexView from '../views/IndexView.vue'
import UserView from '../views/UserView.vue'
import BookView from '@/views/BookView.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      redirect: '/index',
      children:[{
        

        path: '/index',
        name: 'index',
        component: IndexView,

    },
    {
          path: '/user',
          name: 'user',
          component: UserView,

      }
      ,
      {
            path: '/book',
            name: 'book',
            component: BookView,
  
        }
    
    ],
    },
  ],
})

export default router
